UEd Style Tools for Maya
[USTM] UEd Style Tools for Maya
Whenever an UEd User takes Maya to build some Meshes or Brushes for his Map in UEd, he comes across some problems or simply misses the Easy To Use UEd CSG Tools.
This Tool Window provides a fast Setup for the most common Problem, the difference of Size between Maya and UEd, a fast control over the Grid and Translator Snapping and the UEd-like CSG Tools.
This Documents will explain the Use of the Tools and their limitations.
The first thing to explain:
How to Install the Tools?
Extract the Content of the Archive File in your "UserData/Documents/maya/(version)/prefs" Folder.
in Vista: Desktop->YourUserName->Documents->maya->version(i.e. 8.5)->prefs
in XP the Folder should be found in your MyDocuments Folder.
When starting Maya, a new Shelf should appear, the UEd Shelf:

In this Shelf, there is only one button, the button for the Tool Window. You can add some other buttons to this Shelf, for example the "Create Cube Primitive", "Merge Vertices" or other Tools, you often use, when modeling for UE. How to add new Commands to the Shelf is explained in the Maya Help, using the Keywords "MEL Shelf" (Creating a Shelf button for a MEL command);
If you want to add the UEd-Tool-Window Command to your own custom Shelf, you can do this using the "UEdStyleToolWin();" command.
When clicking the Button, or executing the Command in the Script Editor, a Window should appear:

The Window is organized in a "most used" fashion. The Camera Setup should only be needed once per Scene.
This Document instead will begin with the Setup of Defaults and the explanation of the Setup Cameras Command, because they should be done, bevore working with the CSG Tools.
Setting up defaults in Maya
At first we will set up some defaults to make working with Maya for UEd a little easier and faster.
The default sizing of Mayas Primitives is around 1.0 and 2.0 for lengths and radias. If you don't change the default settings for that, you will always have to scale a new created Primitive, or alter its Values after creation. Of course, if you want to change the number of Sides of a Cylinder, you will have to acces these Settings anew for creation, or you have to alter the Creation Settings afterwards in the responsable Node in the Attribute Editor.
To change the Settings for Creation of a Primitive, you may use the Main Menu, or (in newer Maya Versions) the Shift+RightClick-Menu.
In Maya, every Menu Entry that has Options, has a "box" in the Menu Item. Via this "box", you can acces the Settings for the Item.
Change the Grid Settings to Unreal-Style Values:
Click on the "box" in the Display->Grid Menu.

The Grid Settings Window should appear. Change the Settings to mach the following, or choose others as you mind. The Grid Spacing can be changed fast with the Tool in the Tool Window, so you only really have to care about the Length and Width of your Grid (size of the Grid Plane is only relevant in the 3D View)

click Apply and Close to Save the Settings. These Settings are now defaults and will be used when you create a new Szene.
Now you should change the defaults for all Primitives, you often use, with the settings, which match your style most.
For that you open the Attributes of the Primitives through the Create->PolygonPrimitives Menu.

Change the Width, Height and Depth for the Cube Primitive to 256.0 for example.
As said, the most common Problem when working with Maya for UEd, is the different "default sizing". In Maya the default Values are based on 1.0, while in UEd your default cube is 256.0 in size. When you model such sizes in Maya, you run out of Mayas visual space, if you leave the responsable Settings at their defaults.
The Default Maya Camera has a Far Clipping Plane of 1000.0, while the UEd Cam has 65536.0; Mayas Orthogonal Cameras are translatet along their viewing Axis 100.10 Units ( In a way they depend on your default Settings for primitives, but that doesn't help. ), while the Unreal Cams are at the end of UEd Space (32768.0 units along their viewing axis).
Setup Cameras
This Button in the Tool Window executes several commands to move and alter some attributes of your cameras, to give a well sized working environment for UEd typical measures.
A 256 Cube with Mayas default Settings:

The Scene with altered Camera Settings:

CSG
CSG (Constructive Solid Geometry) is used in UEd to create the basic Level Geometry, but also for Deco Objects. As in UEd created Objects often lack polygon optimization and for Static Meshes, the ability to catch lighting correctly, a modern U-Level-Designer needs to create his Objects in 3DsMax, Maya or other advanced 3D Modeling Programs. Most UEd Users who taste Maya realize, that the handling of Maya booleans is more extensive than accustomed from UEd.
If you want to move a boolean-added or subtracted Object after you have executed the boolean Operation, you have to get to the Input Nodes of your geometries History and unhide them. When you execute an boolen Operation, your Active Polygon Object is merged with the other Geometry and you loose your "Builder Brush", you have to duplicate it before or create a new one, which is mostly quite complex for new or infrequent Maya Users who come from the UEd.
The UEd Style CSG Tools are an approach to make the Maya boolean Operation workflow more easy, more UEd-like.
In this System, your "Builder Brush" will automatically be duplicated, before it is calculated against other geometry, and will be reselected after the operation is performed. Quite like the Builder Brush in UEd.
The Calculation Brushes will be automatically revisualized by wireframed copys, so you can easily select them and move them.

But still the Maya Operations perform slightly different and have limitations or extensions against the UEd CSG Tools.
In Maya, you don't need to rebuild your geometry after adding or subtracting, or moving brushes. Maya updates the geometry calculation in realtime. BUT: Therefore the System is History-dependent and not Order-dependent. While you could move a subtracted Brush in UEd anywhere you want, and it would subtract there from all meshes, which were placed there before it, in Maya your Brushes will only alter the geometry on the Objects they had been initially added/subtracted to.
By this limitation it is also not possible to duplicate Calculation Brushes with their impact to the Geometry. But you can Duplicate the Calculation Brushes and perform the wanted CSG Operation anew.(but its a little buggy yet, you will have your duplicated brushes still wireframed but with no effect and not deleted. You may delete them by hand.)
As all the CSG Tools use Mayas "Boolean Operations", they are limited to the functionality of these native Maya Operations.
E.g.: The simple Add construction of the following Arrangement will not work in Maya. If you try to Add the Active Brush now, you will receive a "Cannot perform boolean operation" Warning

But keep in Mind, that it would be much faster, to create that Geo with extrusion of Faces. Do not remain on the UEd-Style Tools, always use what is the fastest and easiest way to achieve your goal. Use a well mixed workflow between normal modeling and CSG operations.
Add
You know the Add Operation from UEd. It will add the active geometry to the Environment.
Subtract
The Subtract Operation is as in UEd. It will subtract the active geometry from the Environment.
Intersect
Intersect works different than known from UEd. The Intersection here is directly performed and the unmatching geometry is sorted out. In UEd you would receive your Intersection Shaped Builder Brush. Here you will receive the Intersection Shaped final geometry.
Limitations:
-Intersecting with more than One Active Brush and/or more than one Object in the Environment can result in Errors and/or weird geometry.
Initialize
Initialize will start a new CSG Environment with the current selected Objects as the geometrical Base. Technically this means: Two Sets (collections of Objects) are created: The CSGEnvironmentSet and the CalculationBrushesSet. Your currently selected Objects are placed in the EnvironmentSet.
CSG Operations will always be performed with the geometry held in the EnvironmentSet. Because of Mayas boolean-operation algorithm, there needs to be one peace of geometry to add/subtract geometry from. Instead of Adding the first Brush, as in UEd, you will here create the Environment with your first Brush.
The both Sets are Visible in the Outliner. You can easily select Calculation Brushes in the CalcBrushesSet using the Outliner.
You should not perform an CSG Operation with a Member of the Environment as Active Brush! This will give weird results.
Advanced:
-You can create the Environment from more than one unconnected Objects. But that is not recommended, as overlapping Objects will not be connected by e.g. adding a Cube between them. Instead the Cube will be added to all Objects in the Environment. You can of course finalize the Environment then and Add the unconnected Chunks together by initializing a ne Environment with one of them and Adding the others.
-If you have forgotten to include an Object into the Environment in the Initialization, you can use the Outliner to move the Object into the Environment Set. Existing CSG Operations will not be performed on the newly added Objects.
Finalize
Finalize will end your current CSG Environment. Technically this means: The History of the Objects is cleared, so empty Nodes are deleted. The Calculation Brushes are deleted. And the CSGEnvironmentSet and the CalculationBrushesSet are cleared and deleted. You receive your final CSG created Object/s.
Show/Hide Calculation Brushes
This Button toggles the Visibility of the wireframed Helper-Objects that locate the Brushes used for the CSG Calculation.
Advanced:
-You can Show/Hide single Calculation Brushes by selecting them (if Hidden, then in the Outliner) and toggling their Visibility State with the default Maya commands (Ctrl+h; Shift+h)
Limitations:
-New Brushes will not be set hidden, even if the current State is hidden. You must retoggle to hide them.
A Short Instruction:
1)Create a Cube.
2)Make sure the Cube is selected, click Initialize.
3)Create another, smaller Cube.
4)Move the smaller Cube half into the first Cube.
5)Click Subtract.
6)Move your selected Cube away from your altered Geometry.
7)You can select the wireframed Calculation Brush and move it.
   The Geometry should change as it moves.
Grid
Grid Tools
The Grid Tools allow quick acces to Grid Spacing, Grid Divisons and Snapping, as known from the UEd.
Grid Snapping
When you enable Grid Snapping, the Move Tool will snap to the Grid Lines. In default Maya Settings, you can also quick-acces that snap-mask with the [x]-key. As long as you hold down [x], the Snap mode is switched.
Rotation Snapping
Rotation Snapping is a Tool-Setting of the Rotation Tool. Tool-Settings can be accessed by double-clicking the Tool-Icons in the Tool-Bar, or via the Menu Windows->ToolSettings. The Rotation Snapping button gives you a quick access to this attribute of the Tool. You can change the Snapping-Angle in the Tool Settings of the Rotate Tool.
Grid Spacing (GS) and Grid Divisions (GD) should be quite selfexplanatory.
In Maya there is no View-Dynamic Grid, as in UEd. When you zoom out in UEd in the Orthographic Views, the Grid Lines mtach higher Spacing Values. To Achieve a similar display in Maya, you can adjust Grid Spacing and Grid Divisons. Divisons mean the number of Grid Lines placed between the darker colored full-value Grid Lines.
You could set your GS to 128 and your GD to 8, that would mean a 16 Units spaced Grid Pattern with darker Lines making up the 128 Unit Patterns.
Sorry for the many spelling mistakes and typos, but i did not really care for correct Type and Syntax in this Document.
USTM; Februar 2008; Johannes 'moonangel' Becker